#!/usr/bin/python
import generic_parser
'''
parser for 4chan.org
ZOMG !! what have i done?
'''
class FourChanParse(generic_parser.GenericParse):
    def __init__(self):
        generic_parser.GenericParse.__init__(self)

    def _get_slash_number(self):
        return 5

    def _url_is_picture(self,url):
        return url.count('%ssrc'%self.board) == 1

    def _get_picture_path(self,picture):
        return 'http://boards.4chan.org%ssrc/%s'%(self.board,picture)

    def _get_current_thread_url(self):
        return 'http://boards.4chan.org%sres/%s' %(self.board,self.thread)


